var t_module={
		
		row_temp:'<div class="row search-row"></div>',
		
		labelText_temp:function(){
			/*
                   <label for="" class="col-md-1 template-input-label">${name}:</label>
                   <div id="lt_${key}" class="col-md-3 template-input-label">
                   		${value}
                   </div>
			 */
		},
		
		
		f_input_temp:function(){		
	/*
	<label for="" class="col-md-1 template-input-label">${name}:</label>
           <div class="col-md-3 template-input-label">
                <input type="${type}" class="form-control" placeholder="${name}" name="${key}" id="${module}${key}" value="${value}"  >
           </div>
	*/	
		},
		f_select_temp:function(){
			/*
			 	<label for="" class="col-md-1 template-input-label">${name}:</label>
	                <div class="col-md-3 template-search-select">
	                    <select  class="form-control template-select" name="${key}" id="${module}${key}" required>
	                        <option value="" disabled selected hidden>请选择${name}</option>
	                    </select>
	                </div>
			 */
			
		},
		
		f_time_temp:function(){
			/*
			 <label for="" class="col-md-1 template-input-label">${name}:</label>
			 <div class="col-xs-9 col-md-5 col-lg-3 form-group">
	                    <div class="input-group input-large custom-date-range template-range-input"  data-date-format="yyyy/mm/dd">
	                       <input type="text"  class="form-control dpd1 readonly"  placeholder="${name}" name="${key}" id="${module}${key}" value="${value}"    readonly="readonly">
	                    </div>
	   			</div>
			 */
		},
		
		doformTime:function(ftime){
			$("#"+ftime.module+ftime.modelKey).datetimepicker({
		        format: "yyyy-mm-dd",     //格式化
		        language: "zh-CN",				//国际化
		        minView: 3,				    //日志视图显示最小单位 0小时 1 天 2 月 3当年 4 十年
		        autoclose:true,				//选择后是否自动关闭
		        todayBtn: true				//添加选择今日按钮
		    })
			
		},
		

		q_input_temp:function(){		
			/*
			<div  class="col-xs-6 col-md-6 col-lg-3  form-group">
	           <div  class="template-search-input">
	                <input type="${type}" class="form-control" placeholder="${name}" name="${key}" id="${module}${key}""  >
	                </div>
	         </div>
 
		*/
		},
		q_select_temp:function(){
			/*
			 <div class="col-xs-6 col-md-3 form-group">
	                                        <div class="input-group col-md-12 col-xs-12 template-search-select">
	                                            <select  class="form-control template-select" name="${modelKey}" id="${module}${modelKey}" required>
	                                            	<option value="" disabled selected hidden>请选择${modelName}</option>
	                      </select>
	                </div>
	           </div>

			 */
		},
		doSelect:function(model){
			
			var  loaddatafunc= this.selectDataProvider[model.dateType]
			
			if(loaddatafunc){
				
				loaddatafunc(model);
			}

		},
		
		selectDataProvider:{
			
			array:function(sel){
				
				var select=$("#"+sel.module+sel.key);
				
				var dataSource = sel.dataSource.split(",");
				
				for(var i in  dataSource){
					
					select.append('<option value="'+dataSource[i]+'">'+dataSource[i]+'</option>')
					
				}
				
				
			},
			json:function(model){
				
			},
			api:function(model){
				
				var select=$("#"+model.module+model.modelKey);
				
				$.ajax({
					type: 'get', // 提交方式 get/post
			        url: model.dataSource, // 需要提交的 url
			        dataType: "json",
			        success: function(data) {
			        	
			        	if(data){
			        	for(var i in  data){
			        		
			        		select.append('<option value="'+data[i].value+'">'+data[i].name+'</option>')
			        		
			        	}
			        	}
			        	
			        }
			        
				});
				
				
			}
			
		},
		
		q_time_temp:function(){
			/*
			 <div class="col-xs-12 col-md-6 col-lg-3 form-group">
	                    <div class="input-group input-large custom-date-range template-range-input"  data-date-format="yyyy/mm/dd">
	                       <input type="text"  class="form-control dpd1 readonly"  placeholder="${name}" name="${key}" id="${module}${key}"    readonly="readonly">
	                       
	                        <span class="input-group-addon">至</span>
	                        <input type="text"  class="form-control dpd2 readonly"  placeholder="${name}" name="${key}_l" id="${module}${key}_l"    readonly="readonly">
	                       
	                    </div>
	   			</div>
			 */
		},
		

		doQueryTime:function(model){
			
			$("#"+model.module+model.key).datetimepicker({
		        format: "yyyy-mm-dd",     //格式化
		        language: "zh-CN",				//国际化
		        minView: 3,				    //日志视图显示最小单位 0小时 1 天 2 月 3当年 4 十年
		        autoclose:true,				//选择后是否自动关闭
		        todayBtn: true				//添加选择今日按钮
		    }).on("changeDate",function(ev){
		        $("#"+model.module+model.key+"_l").datetimepicker("show");
		    });

		    $("#"+model.module+model.key+"_l").datetimepicker({
		        format: "yyyy-mm-dd",     //格式化
		        language: "zh-CN",				//国际化
		        minView: 3,				    //日志视图显示最小单位 0小时 1 天 2 月 3当年 4 十年
		        autoclose:true,				//选择后是否自动关闭
		        todayBtn: true				//添加选择今日按钮
		    }).on("hide",function(ev){
		        var start = $("#"+model.module+model.key).data("datetimepicker").getDate();
		        var end = new Date(ev.date.valueOf());
		        var compare = compareForDay(end,start);
		        if(compare < 0){
		            alertModal("开始时间不能大于结束时间请重新选择");
		            $(this).datetimepicker('update',start);
		        }
		    });
			
			
		},
		
		
		defaltGridConf:{
		        mtype: "get",
		        autowidth:true,
		        styleUI : 'Bootstrap',
		        rownumbers:true,
		        datatype: "json",
		        rownumWidth:60,
		        forceFit :true,
		        multiselect : true,
		        shrinkToFit: false,
		        width:"100%",
		        colModel: [],
		        viewrecords: true,
		        height: "auto",
		        rowNum: 20,
		        pager: "#paginator",
		        rowList : [20, 50, 100, 200],
		        altRows:true,
		        altclass: "gird_altClass"
		    },
		    
		    mcFmt_temp:function (mcUrl,val, index, row){
		    	
		    	return "<a href='"+mcUrl+"?id="+row.id+"' target='_self'>"+val+"</a>";

		    } ,
		   
		    
		    createGrid:function(container,gridConf){
		    	container.jqGrid(gridConf);
		    	container.jqGrid('setLabel',0,'序号','');
		    	
		    }
		   
		
}